import { Live } from '@/model/live/Live';
import { Socket } from '@/model/socket/Socket';
import { useInjectable } from '@/unit/hooks/use-di';
import { NavigateTo } from '@/unit/navigate-to';
import { observer } from 'mobx-react-lite';
import React, { useCallback } from 'react';
import ViewView from './viewView';

export default observer(() => {
  const live = useInjectable(Live);
  const soclet = useInjectable(Socket);

  const message = {
    event: 'hello2',
    data: '测试数据',
  };

  const sendMessage = useCallback((data: any) => {}, []);

  const handleShare = useCallback(() => {
    NavigateTo('live');
  }, []);

  return <ViewView share={handleShare} test={() => {}} create={live.create} />;
});
